﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;

namespace yaip.Filters.PixelGroup {
    public class Sharpen : PixelGroupFilter {

        public Sharpen() {
            convolutionMatrix = new ConvolutionMatrix(new int[3, 3] {
                {0, -2, 0 },
                {-2, 11, -2},
                {0, -2, 0}});
            convolutionMatrix.setFactor(3);
            convolutionMatrix.setOffset(0);
        }


        public override bool apply(Bitmap image) {
            //call the convolution algorithm using the matrix
            return Convolution.ConvolutionRadius1(image, convolutionMatrix);
        }
    }
}
